package top.asteam.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author Rock Wang
 * @Time 2021/4/21
 */
@Service
@FeignClient(value = "CLOUD-PRIVATE-HYSTRIX-PAYMENT", path = "/data", fallback = OrderFallbackService.class)
public interface OrderService {

    @GetMapping("/payment/hystrix/ok")
    String paymentInfoOk(@RequestParam("id") Long id);


    @GetMapping("/payment/hystrix/error")
    String paymentInfoTimeOut(@RequestParam("id") Long id);
}
